package org.spring.springboot.dao;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.spring.springboot.domain.Province;
@Mapper
@CacheNamespace(implementation = MybatisRedisCache.class)
public interface ProvinceDao {
    @Select("SELECT id,province_name FROM province WHERE id=#{id}")
    @Results({
            @Result(property = "id", column = "id"),
            @Result(property = "provinceName", column = "province_name"),

    })
    @Options(useCache = false)
    Province findById(@Param("id") long id);
}
